//
//  ContentView.swift
//  二维码扫描
//
//  Created by apple on 2021/6/8.
//

import SwiftUI

struct ContentView: View {
    @State var isShow: Bool = false
    var body: some View {
        Image(systemName: "qrcode")
            .frame(maxWidth: .infinity, maxHeight: .infinity)
            .onTapGesture {
                self.isShow.toggle()
            }
            .sheet(isPresented: $isShow, content: {
                ScanningView(functionType: .qrCode)
                    .frame(width: 480, height: 300, alignment: .center)
            })
    }
}


struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
